package org.dromara.job.processors.tasks;

import lombok.Data;
import lombok.RequiredArgsConstructor;
import org.dromara.system.domain.vo.WbItemInfoVo;
import org.dromara.system.mapper.WbItemInfoMapper;
import org.springframework.stereotype.Component;
import tech.powerjob.worker.core.processor.ProcessResult;
import tech.powerjob.worker.core.processor.TaskContext;
import tech.powerjob.worker.core.processor.sdk.BasicProcessor;

import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 定时修改项目状态
 * 0标书获取中、1投标中、2评标中、3项目结束
 */
@Component
@RequiredArgsConstructor
public class UpdateProjectState implements BasicProcessor {

    private final  WbItemInfoMapper wbItemInfoMapper;



    @Override
    public ProcessResult process(TaskContext taskContext) throws Exception {
        wbItemInfoMapper.updateStatus();
        System.out.println("更新成功");
        return new ProcessResult(true,"定时任务执行成功");
    }







}
